﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.Cloud.Applications"
				        namespace="Inovout.Cloud.Applications.Models">

  <class name="Application" table="Applications_Application">
    <id name="Id" access="field.camelcase"
        column="ApplicationId" type="Int32">
      <generator class="native" />
    </id>
    <property name="Name"/>
    <property name="Level" />
    <many-to-one name="Membership" column="MembershipId" class="Inovout.Memberships.Models.Membership,Inovout.Memberships" />
    <set name="ApplicationInterfaces"  table="Applications_Application_ApplicationInterface">
      <key column="ApplicationId" foreign-key="FK_Applications_Application_ApplicationInterface"/>
      <many-to-many class="Inovout.Cloud.Applications.Models.ApplicationInterface" column="ApplicationInterfaceId" />
    </set>
    <many-to-one name="ApplicationUser" column="ApplicationUserId" class="Inovout.Cloud.Applications.Security.Models.ApplicationUser" />
    <!--<many-to-one  name="Project" column="ProjectId" class="Inovout.Cloud.Models.Project" />-->
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>


